package com.ruoyi.web.controller.market.special;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.db.domain.SpecialCostomUserInfo;
import com.ruoyi.special.service.ISpecialCostomUserInfoService;
import com.ruoyi.web.wapper.SpecialCostomUserInfoWapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

/**
 * costomuserController
 * 
 * @author ruoyi
 * @date 2022-09-16
 */
@Controller
@RequestMapping("/special/costomuser")
public class SpecialCostomUserInfoController extends BaseController
{
    private String prefix = "special/costomuser";

    @Autowired
    private ISpecialCostomUserInfoService specialCostomUserInfoService;

    @GetMapping("/{costomId}")
    public String costomuser(@PathVariable("costomId") String costomId, ModelMap mmap)
    {
        mmap.put("costomId", costomId);
        return prefix + "/costomuser";
    }

    /**
     * 查询costomuser列表
     */
    @PostMapping("/list")
    @ResponseBody
    public TableDataInfo list(SpecialCostomUserInfo specialCostomUserInfo)
    {
        startPage();
        List<Map<String, Object>> mapList = specialCostomUserInfoService.selectSpecialCostomUserInfoListMap(specialCostomUserInfo);
        mapList = new SpecialCostomUserInfoWapper(mapList).wrap();
        return getDataTable(mapList);
    }

}
